﻿namespace dogd
{
	using System;

	/// <summary>
	/// Declares a column to be a primary key. Storage type is assumed to be int32.
	/// </summary>
	[AttributeUsage(AttributeTargets.Property)]
	public sealed class PrimaryKeyColumnAttribute : ColumnAttribute
	{
		/// <summary>
		/// Initialize with column name.
		/// </summary>
		/// <param name="columnName"></param>
		public PrimaryKeyColumnAttribute(string columnName)
			: base(columnName)
		{
			this.IsPrimaryKey = true;
			this.StorageType = System.Data.DbType.Int32;
		}
	}
}
